﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using PairingMatrix.Common;
using PairingMatrix.Common.Enum;

namespace PairingMatrix.View.Converter
{
    public class PriorityToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value is int)
            {
                switch ((int)value)
                {
                    case 1: return new SolidColorBrush(Color.FromArgb(255,255,54,0));
                    case 2: return new SolidColorBrush(Color.FromArgb(195,255, 148,25));
                    case 3: return new SolidColorBrush(Color.FromArgb(158,86,86,222));
                    case 4: return new SolidColorBrush(Color.FromArgb(158,179,255,252));
                }
            }
            return new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
